/*
 * COPYRIGHT. HSBC HOLDINGS PLC 2016. ALL RIGHTS RESERVED.
 * 
 * This software is only to be used for the purpose for which it has been
 * provided. No part of it is to be reproduced, disassembled, transmitted,
 * stored in a retrieval system nor translated in any human or computer
 * language in any way or for any other purposes whatsoever without the
 * written consent of HSBC Holdings plc.
 */
package com.pactera.integral.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.pactera.integral.entity.AuthorityGroup;


/**
 * @type_name AuthorityGroupDao
 */
@Repository("authorityGroupDao")
public interface AuthorityGroupDao extends CommonRepository<AuthorityGroup, String>{
  
 List<AuthorityGroup> findByGroupId(String groupId);
 
 @Transactional
 @Modifying
 @Query(value = "delete from sys_authority_group where group_id =:groupId ", nativeQuery = true)
 int deleteGroupId(@Param("groupId")String groupId);
}
